package com.dime.physical.service.impl;

import java.util.List;
import com.ruoyi.common.core.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.dime.physical.mapper.DimePhysicalMrRelatedMapper;
import com.dime.physical.domain.DimePhysicalMrRelated;
import com.dime.physical.service.IDimePhysicalMrRelatedService;

/**
 * 总检员工Service业务层处理
 * 
 * @author ruoyi
 * @date 2023-10-10
 */
@Service
public class DimePhysicalMrRelatedServiceImpl implements IDimePhysicalMrRelatedService 
{
    @Autowired
    private DimePhysicalMrRelatedMapper dimePhysicalMrRelatedMapper;

    /**
     * 查询总检员工
     * 
     * @param id 总检员工主键
     * @return 总检员工
     */
    @Override
    public DimePhysicalMrRelated selectDimePhysicalMrRelatedById(String id)
    {
        return dimePhysicalMrRelatedMapper.selectDimePhysicalMrRelatedById(id);
    }

    /**
     * 查询总检员工列表
     * 
     * @param dimePhysicalMrRelated 总检员工
     * @return 总检员工
     */
    @Override
    public List<DimePhysicalMrRelated> selectDimePhysicalMrRelatedList(DimePhysicalMrRelated dimePhysicalMrRelated)
    {
        return dimePhysicalMrRelatedMapper.selectDimePhysicalMrRelatedList(dimePhysicalMrRelated);
    }

    /**
     * 新增总检员工
     * 
     * @param dimePhysicalMrRelated 总检员工
     * @return 结果
     */
    @Override
    public int insertDimePhysicalMrRelated(DimePhysicalMrRelated dimePhysicalMrRelated)
    {
        dimePhysicalMrRelated.setCreateTime(DateUtils.getNowDate());
        return dimePhysicalMrRelatedMapper.insertDimePhysicalMrRelated(dimePhysicalMrRelated);
    }

    /**
     * 修改总检员工
     * 
     * @param dimePhysicalMrRelated 总检员工
     * @return 结果
     */
    @Override
    public int updateDimePhysicalMrRelated(DimePhysicalMrRelated dimePhysicalMrRelated)
    {
        dimePhysicalMrRelated.setUpdateTime(DateUtils.getNowDate());
        return dimePhysicalMrRelatedMapper.updateDimePhysicalMrRelated(dimePhysicalMrRelated);
    }

    /**
     * 批量删除总检员工
     * 
     * @param ids 需要删除的总检员工主键
     * @return 结果
     */
    @Override
    public int deleteDimePhysicalMrRelatedByIds(String[] ids)
    {
        return dimePhysicalMrRelatedMapper.deleteDimePhysicalMrRelatedByIds(ids);
    }

    /**
     * 删除总检员工信息
     * 
     * @param id 总检员工主键
     * @return 结果
     */
    @Override
    public int deleteDimePhysicalMrRelatedById(String id)
    {
        return dimePhysicalMrRelatedMapper.deleteDimePhysicalMrRelatedById(id);
    }
}
